package com.example.leaderapplication.Bean;

import android.os.Parcel;
import android.os.Parcelable;

public class HomeItemBean implements Parcelable {

    /**
     * path : /a/a
     * component : vue
     * name :
     * hidden : 0
     * menuNo : 120052917011990002
     * menuCategory : 1
     * meta : {"icon":"http://","title":"常用报表"}
     */

    private String path;
    private String component;
    private String name;
    private String hidden;
    private String menuNo;
    private int menuCategory;
    private MetaBean meta;

    protected HomeItemBean(Parcel in) {
        path = in.readString();
        component = in.readString();
        name = in.readString();
        hidden = in.readString();
        menuNo = in.readString();
        menuCategory = in.readInt();
    }

    public static final Creator<HomeItemBean> CREATOR = new Creator<HomeItemBean>() {
        @Override
        public HomeItemBean createFromParcel(Parcel in) {
            return new HomeItemBean(in);
        }

        @Override
        public HomeItemBean[] newArray(int size) {
            return new HomeItemBean[size];
        }
    };

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHidden() {
        return hidden;
    }

    public void setHidden(String hidden) {
        this.hidden = hidden;
    }

    public String getMenuNo() {
        return menuNo;
    }

    public void setMenuNo(String menuNo) {
        this.menuNo = menuNo;
    }

    public int getMenuCategory() {
        return menuCategory;
    }

    public void setMenuCategory(int menuCategory) {
        this.menuCategory = menuCategory;
    }

    public MetaBean getMeta() {
        return meta;
    }

    public void setMeta(MetaBean meta) {
        this.meta = meta;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(path);
        dest.writeString(component);
        dest.writeString(name);
        dest.writeString(hidden);
        dest.writeString(menuNo);
        dest.writeInt(menuCategory);
    }

    public static class MetaBean implements Parcelable {
        /**
         * icon : http://
         * title : 常用报表
         */

        private String icon;
        private String title;

        protected MetaBean(Parcel in) {
            icon = in.readString();
            title = in.readString();
        }

        public static final Creator<MetaBean> CREATOR = new Creator<MetaBean>() {
            @Override
            public MetaBean createFromParcel(Parcel in) {
                return new MetaBean(in);
            }

            @Override
            public MetaBean[] newArray(int size) {
                return new MetaBean[size];
            }
        };

        public String getIcon() {
            return icon;
        }

        public void setIcon(String icon) {
            this.icon = icon;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(icon);
            dest.writeString(title);
        }
    }
}
